<?php
defined('IN_IA') or exit('Access Denied');
global $_W, $_GPC;
if ($_W['isfounder']) {
	$sql = "
update `ims_bsht_tbk_all_item` set `itemyhj_url` = REPLACE (`itemyhj_url`,'http://','https://');
update `ims_bsht_tbk_item` set `itemyhj_url` = REPLACE (`itemyhj_url`,'http://','https://');
update `ims_bsht_tbk_dtk_item` set `itemyhj_url` = REPLACE (`itemyhj_url`,'http://','https://');


update `ims_bsht_tbk_all_item` set `itemurl` = REPLACE (`itemurl`,'http://','https://');
update `ims_bsht_tbk_item` set `itemurl` = REPLACE (`itemurl`,'http://','https://');
update `ims_bsht_tbk_dtk_item` set `itemurl` = REPLACE (`itemurl`,'http://','https://');

update `ims_bsht_tbk_all_item` set `itemsurl` = REPLACE (`itemsurl`,'http://','https://');
update `ims_bsht_tbk_item` set `itemsurl` = REPLACE (`itemsurl`,'http://','https://');
update `ims_bsht_tbk_dtk_item` set `itemsurl` = REPLACE (`itemsurl`,'http://','https://');


update `ims_bsht_tbk_all_item` set `itemyhj_tkl` = '';
update `ims_bsht_tbk_item` set `itemyhj_tkl` = '';
update `ims_bsht_tbk_dtk_item` set `itemyhj_tkl` = '';
";
	pdo_run($sql);
	message('数据库升级成功！', $this->createWebUrl('opcenter'), 'success');
} else {
	message('无需升级操作！', $this->createWebUrl('opcenter'), 'error');
}